package com.dragon.pojo.Record;

import com.dragon.pojo.Problem.JudgeInfo;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Record {
    private Integer id;

    private Integer problemId;

    private Integer userId;

    private String username;

    private Integer contestId;

    private String problemTitle;

    private Integer completeStatus;

    private Integer score;

    private long time;

    private long memory;

    private long fileSize;

    private String language;

    private String codePath;

    private List<JudgeInfo> pointList;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    public Record(Integer problemId, Integer userId, String problemTitle, Integer completeStatus, Integer score, long time, long memory, long fileSize, String language, String codePath, List<JudgeInfo> judgeInfoList) {
        this.problemId = problemId;
        this.userId = userId;
        this.problemTitle = problemTitle;
        this.completeStatus = completeStatus;
        this.score = score;
        this.time = time;
        this.memory = memory;
        this.fileSize = fileSize;
        this.language = language;
        this.codePath = codePath;
        this.pointList = judgeInfoList;
    }
    public Record(Integer problemId, Integer contestId, Integer userId, String username, String problemTitle, Integer completeStatus, Integer score, long time, long memory, long fileSize, String language, String codePath, List<JudgeInfo> judgeInfoList) {
        this.problemId = problemId;
        this.contestId = contestId;
        this.userId = userId;
        this.username = username;
        this.problemTitle = problemTitle;
        this.completeStatus = completeStatus;
        this.score = score;
        this.time = time;
        this.memory = memory;
        this.fileSize = fileSize;
        this.language = language;
        this.codePath = codePath;
        this.pointList = judgeInfoList;
    }
}
